home *** CD-ROM | disk | FTP | other *** search
- //
- // Fichero: FUNCDLG.CPP
- //
- // Versi≤n: 1.0
- // Autor: Antonio M. EstΘvez Lorenzo
- // Prop≤sito: Cuadros de dißlogo de la aplicaci≤n
- //
-
- #include <windows.h>
- #include <owl.h>
- #pragma hdrstop
-
- #include "FuncDlg.h"
- #include "Strings.h"
- #include "Errores.ids"
- #include "Ayuda.ids"
- #include <BChkBox.h>
- #include <BRadio.h>
- #include <Edit.h>
- #include <ScrollBa.h>
-
- #define NumDec 10
- #define NumEdit sizeof(MatEdit)/sizeof(MatEdit[0])
-
-
- /* TDlgEdit */
-
- static int MatEdit[][2] = {{edNombre,LongFunc},
- {edInfX, LongReal}, {edSupX, LongReal}, {edInfY, LongReal},
- {edSupY, LongReal}, {edNodosX,LongInt}, {edNodosY,LongInt},
- {edEscX, LongReal}, {edEscY, LongReal}, {edEscZ, LongReal},
- {edCoordX,LongReal}, {edCoordY,LongReal}, {edCoordZ,LongReal},
- {edAngIniX,LongInt}, {edAngIniY,LongInt}, {edAngIniZ,LongInt}};
-
- void TDlgEdit::CreaControl(BOOL embedded, BOOL cancel)
- {
- Embedded= embedded;
- Cancel = cancel;
- for(int i= 0; i< NumEdit; i++)
- new TEdit(this, MatEdit[i][0], MatEdit[i][1]);
- new TGroupBox(this, grDimen);
- }
-
- void TDlgEdit::SetupWindow()
- {
- TWindDlg::SetupWindow();
- EnableWindow(GetDlgItem(HWindow,edNombre), !Embedded);
- EnableWindow(GetDlgItem(HWindow,boCancel), Cancel);
- if(!IsWindowVisible(Parent->HWindow))
- EnableWindow(GetDlgItem(HWindow,boCalculadora), FALSE);
-
- HMENU hMenu= GetSystemMenu(HWindow, FALSE);
- EnableMenuItem(hMenu, SC_CLOSE,
- MF_BYCOMMAND | (Cancel ? MF_ENABLED : MF_GRAYED));
- }
-
- void TDlgEdit::FuncDef(RTMessage)
- {
- RECT Rect1,Rect2;
-
- GetWindowRect(ChildWithId(grDimen)->HWindow, &Rect1);
- GetWindowRect(HWindow, &Rect2);
- GetModule()->ExecDialog(new TDlgFuncDef(this, Rect1.top-Rect2.top));
- }
-
- void TDlgEdit::Calcula(RTMessage)
- {
- HWND hWind= GetApplicationObject()->MainWindow->HWindow;
- SendMessage(hWind, WM_COMMAND, cmCalculadora, NULL);
- }
-
-
- /* TDlgEditPar */
-
- TDlgEditPar::TDlgEditPar(PTWindowsObject parent, TSuperfPar *Sup,
- BOOL embedded, BOOL cancel, PTModule module)
- :TDlgEdit(parent, dgEditPar, module)
- {
- new TEdit(this, edEcuX, LongFunc);
- new TEdit(this, edEcuY, LongFunc);
- new TEdit(this, edEcuZ, LongFunc);
- CreaControl(embedded, cancel);
-
- Superf= Sup;
- TransferBuffer= EcuPar= &Sup->Superf;
- }
-
- BOOL TDlgEditPar::CanClose()
- {
- TDatEcuPar DatTmp;
-
- TransferBuffer= &DatTmp;
- TransferData(TF_GETDATA);
- TransferBuffer= EcuPar;
-
- int Error= Superf->InitSuperf(&DatTmp);
- if(Error)
- Mensaje(HWindow,Error);
- else
- return TRUE;
-
- return FALSE;
- }
-
-
- /* TDlgEdit2V */
-
- TDlgEdit2V::TDlgEdit2V(PTWindowsObject parent, TSuperf2V *Sup,
- BOOL embedded, BOOL cancel, PTModule module)
- :TDlgEdit(parent, dgEdit2V, module)
- {
- new TEdit(this, edFunc, LongFunc);
- CreaControl(embedded, cancel);
-
- Superf= Sup;
- TransferBuffer= Func2V= &Sup->Superf;
- }
-
- BOOL TDlgEdit2V::CanClose()
- {
- TDatFunc2V DatTmp;
-
- TransferBuffer= &DatTmp;
- TransferData(TF_GETDATA);
- TransferBuffer= Func2V;
-
- int Error= Superf->InitSuperf(&DatTmp);
- if(Error)
- Mensaje(HWindow, Error);
- else
- return TRUE;
-
- return FALSE;
- }
-
-
- /* TDlgCalcPar */
-
- TDlgCalcPar::TDlgCalcPar(PTWindowsObject parent, TSuperf *Sup,
- TVarEcuPar *Var, PTModule module)
- :TWindDlg(parent, dgCalcPar, module)
- {
- new TEdit(this,edVarX, LongReal);
- new TEdit(this,edVarY, LongReal);
- new TStatic(this,edNumX, LongReal)->EnableTransfer();
- new TStatic(this,edNumY, LongReal)->EnableTransfer();
- new TStatic(this,edNumZ, LongReal)->EnableTransfer();
- *Var->X= *Var->Y= *Var->Z= '\0';
- TransferBuffer= Var;
- varAB= Var;
- Superf= Sup;
- }
-
- void TDlgCalcPar::Calcular(RTMessage)
- {
- RealStr strX, strY, strZ;
- float X,Y,Z;
-
- TransferData(TF_GETDATA);
-
- if(CalculaReal(varAB->A, &Superf->varX) &&
- CalculaReal(varAB->B, &Superf->varY) &&
- Superf->Calcula(&X,&Y,&Z))
- {
- gcvt(X,NumDec,varAB->X);
- gcvt(Y,NumDec,varAB->Y);
- gcvt(Z,NumDec,varAB->Z);
- }
- else
- {
- *(char*)&varAB->X= NULL;
- *(char*)&varAB->Y= NULL;
- *(char*)&varAB->Z= NULL;
- }
- TransferData(TF_SETDATA);
- SetFocus(ChildWithId(edVarX)->HWindow);
- }
-
-
- /* TDlgCalc2V */
-
- TDlgCalc2V::TDlgCalc2V(PTWindowsObject parent, TSuperf *Sup,
- TVarFunc2V *Var, PTModule module)
- :TWindDlg(parent, dgCalc2V, module)
- {
- new TEdit(this,edVarX, LongReal);
- new TEdit(this,edVarY, LongReal);
- new TStatic(this,edNumX, LongReal)->EnableTransfer();
- *Var->Z= '\0';
- TransferBuffer= Var;
- varXY= Var;
- Superf= Sup;
- }
-
- void TDlgCalc2V::Calcular(RTMessage)
- {
- float X,Y,Z;
-
- TransferData(TF_GETDATA);
-
- if(CalculaReal(varXY->X, &Superf->varX) &&
- CalculaReal(varXY->Y, &Superf->varY) &&
- Superf->Calcula(&X,&Y,&Z))
- gcvt(Z,NumDec,varXY->Z);
- else
- *(char*)&varXY->Z= NULL;
- TransferData(TF_SETDATA);
- SetFocus(ChildWithId(edVarX)->HWindow);
- }
-
-
- /* TDlgCalcula */
-
- struct TDatCalcula
- {
- char Func[LongFunc];
- char Result[LongReal];
- } DatCalcula = {"",""};
-
- TDlgCalcula::TDlgCalcula(PTWindowsObject parent, PTModule module)
- :TWindDlg(parent, dgCalculadora, module)
- {
- new TEdit(this, edFunc, LongFunc, module);
- new TStatic(this, edResult, LongReal, module)->EnableTransfer();
- TransferBuffer= &DatCalcula;
- HMENU hMenu= GetMenu(parent->HWindow);
- EnableMenuItem(hMenu, cmCalculadora, MF_BYCOMMAND | MF_GRAYED);
- }
-
- TDlgCalcula::~TDlgCalcula()
- {
- HMENU hMenu= GetMenu(Parent->HWindow);
- EnableMenuItem(hMenu, cmCalculadora, MF_BYCOMMAND | MF_ENABLED);
- }
-
- void TDlgCalcula::SetupWindow()
- {
- TDialog::SetupWindow();
-
- RECT ParWind,Wind;
- POINT Coord;
-
- GetClientRect(Parent->HWindow, &ParWind);
- GetClientRect(HWindow, &Wind);
- Coord.x= ParWind.right - Wind.right - 1;
- Coord.y= 0;
- ClientToScreen(Parent->HWindow, &Coord);
- MueveA(Coord.x, Coord.y);
- }
-
- LPSTR TDlgCalcula::GetClassName()
- {
- return "CALC";
- }
-
- void TDlgCalcula::GetWindowClass(WNDCLASS &AWndClass)
- {
- TWindDlg::GetWindowClass(AWndClass);
- AWndClass.hIcon= LoadIcon(GetApplication()->hInstance,"calc");
- }
-
- void TDlgCalcula::Minimizar(RTMessage Msg)
- {
- RECT Rect;
- POINT Coord;
- WINDOWPOS *Pos= (WINDOWPOS*)Msg.LParam;
-
- if((Pos->flags & SWP_SHOWWINDOW) &&
- !(Pos->flags & SWP_NOMOVE))
- {
- GetClientRect(Parent->HWindow, &Rect);
- Coord.x= Rect.right - 70;
- Coord.y= 10;
- ClientToScreen(Parent->HWindow, &Coord);
- Pos->x= Coord.x;
- Pos->y= Coord.y;
- }
- DefWndProc(Msg);
- }
-
- void TDlgCalcula::Calcular(RTMessage)
- {
- REAL Result;
-
- TransferData(TF_GETDATA);
- if(CalculaReal(DatCalcula.Func, &Result))
- gcvt(Result,NumDec,DatCalcula.Result);
- else
- *(char*)&DatCalcula.Result= '\0';
- TransferData(TF_SETDATA);
- SetFocus(ChildWithId(edFunc)->HWindow);
- }
-
-
- /* TDlgImprimir */
-
- TDlgImprimir::TDlgImprimir(PTWindowsObject parent,
- TDatImpr *Dat, SIZE PageSize, PTModule module)
- :TWindDlg(parent, dgImprimir, module)
- {
- IntToSt(Dat->MaxX,PageSize.cx);
- IntToSt(Dat->MaxY,PageSize.cy);
- IntToSt(Dat->DimStrX,Dat->DimX);
- IntToSt(Dat->DimStrY,Dat->DimY);
-
- TGroupBox *Grupo;
-
- Grupo= new TGroupBox(this,grPosVert);
- new TBRadioButton(this,rb1,Grupo);
- new TBRadioButton(this,rb2,Grupo);
- new TBRadioButton(this,rb3,Grupo);
- Grupo= new TGroupBox(this,grPosHorz);
- new TBRadioButton(this,rb4,Grupo);
- new TBRadioButton(this,rb5,Grupo);
- new TBRadioButton(this,rb6,Grupo);
- Grupo= new TGroupBox(this,grCoord);
- new TBCheckBox(this,cb1,Grupo);
- new TEdit(this,edCoordX, LongInt);
- new TEdit(this,edCoordY, LongInt);
- new TBCheckBox(this,cb2,NULL);
- new TStatic(this,edNumX, LongInt)->EnableTransfer();
- new TStatic(this,edNumY, LongInt)->EnableTransfer();
- Grupo= new TGroupBox(this,grDimen);
- new TEdit(this,edEscX, LongInt);
- new TEdit(this,edEscY, LongInt);
- new TBRadioButton(this,rbAncho,Grupo);
- new TBRadioButton(this,rbAlto,Grupo);
- TransferBuffer= DatImpr= Dat;
- }
-
- void TDlgImprimir::Coord(RTMessage)
- {
- BOOL Act;
- int i;
-
- Act= ((TBCheckBox*)ChildWithId(cb1))->GetCheck();
- for(i= rb1; i<= rb6; i++)
- EnableWindow(GetDlgItem(HWindow,i),!Act);
- EnableWindow(GetDlgItem(HWindow,edCoordX),Act);
- EnableWindow(GetDlgItem(HWindow,edCoordY),Act);
- }
-
- void TDlgImprimir::Dimen(RTMessage)
- {
- BOOL Act= ((TBCheckBox*)ChildWithId(rbAncho))->GetCheck();
- EnableWindow(GetDlgItem(HWindow,edEscX),Act);
- EnableWindow(GetDlgItem(HWindow,edEscY),!Act);
- }
-
- BOOL TDlgImprimir::CanClose()
- {
- TDatImpr Dat;
- int CoordX, CoordY;
- int DimX, DimY;
-
- TransferBuffer= &Dat;
- TransferData(TF_GETDATA);
- TransferBuffer= DatImpr;
-
- if(IntValido(Dat.CoordStrX,&CoordX,-20000,20000) &&
- IntValido(Dat.CoordStrY,&CoordY,-20000,20000))
- if(IntValido(Dat.DimStrX,&DimX,10,20000) &&
- IntValido(Dat.DimStrY,&DimY,10,20000))
- {
- DatImpr->CoordX= CoordX;
- DatImpr->CoordY= CoordY;
- DatImpr->DimX= DimX;
- DatImpr->DimY= DimY;
- return TRUE;
- }
- else
- Mensaje(HWindow,ErrorDimPag);
- else
- Mensaje(HWindow,ErrorCrdPrn);
- return FALSE;
- }
-
-
- /* TDlgBmp */
-
- #define LongEje 40
-
- class TDlgBmp: public TStatic
- {
- protected:
- virtual void Paint(HDC, PAINTSTRUCT _FAR &);
- virtual LPSTR GetClassName();
- public:
- TDlgBmp(PTWindowsObject parent, PTModule module= NULL)
- :TStatic(parent, bmEjes, 0, module) {};
- void Dibuja();
- };
-
- static POINT Ejes[5];
- static TScrollBar *sbXZ, *sbYZ;
- static TStatic *edXZ, *edYZ;
- static TDlgBmp *BMap;
-
-
- LPSTR TDlgBmp::GetClassName()
- {
- return "DLGBMP";
- }
-
- void TDlgBmp::Paint(HDC, PAINTSTRUCT &)
- {
- Dibuja();
- }
-
- void TDlgBmp::Dibuja()
- {
- int XZ, YZ;
- REAL SinXZ, CosXZ, SinYZ, CosYZ;
- IntStr Str;
-
- IntToSt(Str,XZ= sbXZ->GetPosition()); edXZ->SetText(Str);
- IntToSt(Str,YZ= sbYZ->GetPosition()); edYZ->SetText(Str);
- CalcAng(XZ, LongEje, SinXZ,CosXZ);
- CalcAng(YZ, LongEje, SinYZ,CosYZ);
-
- int OrgX= Attr.W>>1;
- int OrgY= Attr.H>>1;
-
- HDC Hdc = GetDC(HWindow);
- HRGN HRgn= CreateRectRgn(0,0,Attr.W-2,Attr.H-2);
- SelectClipRgn(Hdc,HRgn);
- PaintRgn(Hdc,HRgn);
- Ejes[0].x= OrgX;
- Ejes[0].y= OrgY-LongEje;
- Ejes[2].x= OrgX-CosXZ;
- Ejes[2].y= OrgY+SinXZ;
- Ejes[4].x= OrgX+CosYZ;
- Ejes[4].y= OrgY+SinYZ;
- Ejes[1].x= Ejes[3].x= OrgX;
- Ejes[1].y= Ejes[3].y= OrgY;
-
- HFONT hfont= (HFONT)SelectObject(Hdc,
- CreateFont(-9, 0, 0, 0, FW_BOLD,
- 0, 0, 0, 0, 0, 0, 0, 0, "BorlandTE"));
- TextOut(Hdc,OrgX+3,OrgY-LongEje-8,"Z",1);
- TextOut(Hdc,OrgX-CosXZ,OrgY+SinXZ,"X",1);
- TextOut(Hdc,OrgX+CosYZ,OrgY+SinYZ,"Y",1);
- DeleteObject(SelectObject(Hdc, hfont));
- Polyline(Hdc,Ejes,5);
- DeleteObject(HRgn);
- ReleaseDC(HWindow,Hdc);
- }
-
-
- /* TDlgPersp */
-
- TDlgPersp::TDlgPersp(PTWindowsObject parent, TSuperf *Sup, PTModule module)
- :TWindDlg(parent, dgPersp, module)
- {
- TGroupBox *Grupo;
-
- Grupo= new TGroupBox(this,grPersp);
- new TBRadioButton(this,cmAxonom,Grupo);
- new TBRadioButton(this,cmAlzado,Grupo);
- new TBRadioButton(this,cmPerfil,Grupo);
- new TBRadioButton(this,cmPlanta,Grupo);
- new TBRadioButton(this,cmIsomet,Grupo);
- new TBRadioButton(this,cmCaball,Grupo);
- new TBCheckBox(this,cb1,Grupo);
- Grupo= new TGroupBox(this,grCaballera);
- new TBRadioButton(this,rbCR,Grupo);
- new TBRadioButton(this,rbAP,Grupo);
- new TEdit(this,edCabCoef, LongReal);
- new TEdit(this,edCabAng, LongInt);
- Grupo= new TGroupBox(this,grEje);
- new TBRadioButton(this,cmEjeX,Grupo);
- new TBRadioButton(this,cmEjeY,Grupo);
- new TBRadioButton(this,cmEjeZ,Grupo);
- new TBRadioButton(this,cmOtroEje,Grupo);
- new TEdit(this,edIntvGiro, LongInt);
- Grupo= new TGroupBox(this,grDibComo);
- new TBRadioButton(this,rbMalla,Grupo);
- new TBRadioButton(this,rbPuntos,Grupo);
- new TBRadioButton(this,rbIntvX,Grupo);
- new TBRadioButton(this,rbIntvY,Grupo);
- sbXZ= new TScrollBar(this,sbAngXZ);
- sbYZ= new TScrollBar(this,sbAngYZ);
- edXZ= new TStatic(this,edAngXZ,LongInt);
- edYZ= new TStatic(this,edAngYZ,LongInt);
- BMap= new TDlgBmp(this);
-
- Superf= Sup;
- TransferBuffer= tmpGraf= &Sup->Grafica;
-
- AngXZ = tmpGraf->AngXZ;
- AngYZ = tmpGraf->AngYZ;
- CabXZ = tmpGraf->CabXZ;
- Caball= Axonom= FALSE;
- if(!tmpGraf->TipoPersp[5])
- {
- Axonom= TRUE;
- tmpGraf->PosAngXZ= AngXZ;
- tmpGraf->PosAngYZ= AngYZ;
- }
- else
- {
- Caball= TRUE;
- tmpGraf->PosAngXZ= CabXZ;
- tmpGraf->PosAngYZ= 90;
- }
- }
-
- BOOL TDlgPersp::CanClose()
- {
- TDatGrafica DatTmp;
-
- TransferBuffer= &DatTmp;
- TransferData(TF_GETDATA);
- TransferBuffer= tmpGraf;
-
- int Error= Superf->InitGrafica(&DatTmp);
-
- if(Error)
- {
- Mensaje(HWindow,Error);
- return FALSE;
- }
- if(Axonom)
- {
- AngXZ= sbXZ->GetPosition();
- AngYZ= sbYZ->GetPosition();
- }
- if(Caball)
- CabXZ= sbXZ->GetPosition();
-
- tmpGraf->AngXZ= AngXZ;
- tmpGraf->AngYZ= AngYZ;
- tmpGraf->CabXZ= CabXZ;
- return TRUE;
- }
-
- void TDlgPersp::ScrollXZ(RTMessage)
- {
- BMap->Dibuja();
- }
-
- void TDlgPersp::ScrollYZ(RTMessage)
- {
- BMap->Dibuja();
- }
-
- void TDlgPersp::Caballera(RTMessage Msg)
- {
- Grupo(Msg);
- }
-
- void TDlgPersp::Grupo(RTMessage)
- {
- int Act0,Act1,Act2,Act3,Act4,Act5;
-
- Act0= ((TBRadioButton*)ChildWithId(cmAxonom))->GetCheck();
- Act1= ((TBRadioButton*)ChildWithId(cmCaball))->GetCheck();
-
- if(Act0 && !Axonom)
- {
- CabXZ= sbXZ->GetPosition();
- sbXZ->SetPosition(AngXZ);
- sbYZ->SetPosition(AngYZ);
- Axonom= TRUE;
- Caball= FALSE;
- BMap->Dibuja();
- }
- if(Act1 && !Caball)
- {
- AngXZ= sbXZ->GetPosition();
- AngYZ= sbYZ->GetPosition();
- sbXZ->SetPosition(CabXZ);
- sbYZ->SetPosition(90);
- Axonom= FALSE;
- Caball= TRUE;
- BMap->Dibuja();
- }
-
- Act3 = ((TRadioButton*)ChildWithId(rbCR))->GetCheck();
- Act4 = ((TRadioButton*)ChildWithId(cmIsomet))->GetCheck();
- Act5 = ((TRadioButton*)ChildWithId(cb1))->GetCheck();
- Act2 = Act1 & Act5;
- Act1|= Act0;
-
- EnableWindow(GetDlgItem(HWindow,sbAngXZ), Act1);
- EnableWindow(GetDlgItem(HWindow,edAngXZ), Act1);
- EnableWindow(GetDlgItem(HWindow,sbAngYZ), Act0);
- EnableWindow(GetDlgItem(HWindow,edAngYZ), Act0);
- EnableWindow(GetDlgItem(HWindow,rbCR), Act2);
- EnableWindow(GetDlgItem(HWindow,rbAP), Act2);
- EnableWindow(GetDlgItem(HWindow,edCabCoef),Act2 & Act3);
- EnableWindow(GetDlgItem(HWindow,edCabAng), Act2 & !Act3);
- EnableWindow(GetDlgItem(HWindow,cb1), Act1 | Act4);
- }
-
- void TDlgPersp::TipoEje(RTMessage)
- {
- if(((TBRadioButton*)ChildWithId(cmOtroEje))->GetCheck())
- GetModule()->ExecDialog(new TDlgEjeGiro(this,Superf));
- }
-
-
- /* TDlgEjeGiro */
-
- TDlgEjeGiro::TDlgEjeGiro(PTWindowsObject parent, TSuperf *Sup, PTModule module)
- :TWindDlg(parent, dgEjeGiro, module)
- {
- TGroupBox *Grupo;
-
- for(int i= edPnt1X; i<= edEjeY; i++)
- new TEdit(this, i, LongReal);
-
- new TBCheckBox(this,cb1,NULL);
- Grupo= new TGroupBox(this,grEje);
- new TBRadioButton(this,rb1,Grupo);
- new TBRadioButton(this,rb2,Grupo);
- new TBRadioButton(this,rb3,Grupo);
- new TBRadioButton(this,rb4,Grupo);
- new TStatic(this,edVarX,7);
- new TStatic(this,edVarY,7);
-
- CoorY= 132;
- Superf= Sup;
- TransferBuffer= tmpEje= &Sup->EjeGiro;
- }
-
- BOOL TDlgEjeGiro::CanClose()
- {
- TDatEje DatTmp;
-
- TransferBuffer= &DatTmp;
- TransferData(TF_GETDATA);
- TransferBuffer= tmpEje;
-
- int Error= Superf->InitEjeGiro(&DatTmp);
-
- if(Error)
- {
- Mensaje(HWindow,Error);
- return FALSE;
- }
- return TRUE;
- }
-
- void TDlgEjeGiro::TipoEje(RTMessage)
- {
- int Act1= ((TBRadioButton*)ChildWithId(rb2))->GetCheck();
- int Act2= ((TBRadioButton*)ChildWithId(rb1))->GetCheck() || Act1;
- int Act3= !Act2;
-
- EnableWindow(GetDlgItem(HWindow,edPnt1X), Act1);
- EnableWindow(GetDlgItem(HWindow,edPnt1Y), Act1);
- EnableWindow(GetDlgItem(HWindow,edPnt1Z), Act1);
-
- EnableWindow(GetDlgItem(HWindow,edPnt2X), Act2);
- EnableWindow(GetDlgItem(HWindow,edPnt2Y), Act2);
- EnableWindow(GetDlgItem(HWindow,edPnt2Z), Act2);
-
- EnableWindow(GetDlgItem(HWindow,edVarX), Act3);
- EnableWindow(GetDlgItem(HWindow,edVarY), Act3);
- EnableWindow(GetDlgItem(HWindow,edEjeX), Act3);
- EnableWindow(GetDlgItem(HWindow,edEjeY), Act3);
- EnableWindow(GetDlgItem(HWindow,cb1), Act3);
- }
-
-
- /* TDlgTipoSup */
-
- TDlgTipoSup::TDlgTipoSup(PTWindowsObject parent, TTipoSup *Tipo, PTModule module)
- :TWindDlg(parent, dgTipoSup, module)
- {
- TGroupBox *Grupo;
-
- Grupo= new TGroupBox(this,grPersp);
- new TBRadioButton(this,rb1,Grupo);
- new TBRadioButton(this,rb2,Grupo);
-
- TransferBuffer= Tipo;
- }
-
-
- /* TDlgFuncDef */
-
- TDlgFuncDef::TDlgFuncDef(PTWindowsObject parent, int Y, PTModule module)
- :TWindDlg(parent, dgFuncDef, module)
- {
- CoorY= Y;
- }
-
-
- /* TFuncion */
-
- void TFuncion::MensajeError(LPSTR Mens)
- {
- char *Str= new char[256];
- char *Pnt= Str;
- int Cont= 0;
-
- do{
- if(Cont++== 25)
- {
- Cont= 0;
- if(*Mens!= ' ')
- *Pnt++= ' ';
- }
- *Pnt++= *Mens;
- }while(*Mens++ != '\0');
- ::Mensaje(NULL, Str);
- delete Str;
- }
-